import { uniFetch } from './uni-fetch.js'
export default {
  /**
   * @param {Object} data - 登录所需要的用户名密码
   */
  login(data) {
    if (!data.account || !data.password) return
    return uniFetch.post('/driver/login/account', data)
  },
  profile() {
    return uniFetch.get('/driver/users')
  },
  taskReport(data) {
    return uniFetch.get('/driver/users/taskReport', data)
  },
  truck() {
    return uniFetch.get('/driver/users/truck')
  },
}
